package ui;

import javax.swing.*;
import java.awt.*;

public class LayerLevel extends Layer {

    /**
     * 图片标题宽度
     */
    private static final int IMG_LV_W=Img.LVEVL.getWidth(null);



    public LayerLevel(int x, int y, int w, int h) {
        super(x, y, w, h);
    }

    @Override
    public void paint(Graphics g){
        this.createWindow(g);
        //绘制窗口标题
        int centerX = (this.w - IMG_LV_W>>1);
        g.drawImage(Img.LVEVL,centerX+this.x,this.y+PADDING,null);
        //显示等级
        this.drawNumberLeftPad(centerX,64,this.dto.getNowlevel(),2,g);

    }
}
